package org.soarsky.wealthchengdu.view;

import org.soarsky.wealthchengdu.appliction.MyAppliction;
import org.soarsky.wealthchengdu.language.LanguageUtil;
import org.soarsky.wealthchengdu.language.Language_Cn;
import org.soarsky.wealthchengdu.util.Config;

import android.app.Activity;
import android.app.ProgressDialog;

public class ALLSendDialog {
	private static ProgressDialog progressDialog;

	/**
	 * 显示dialog
	 * 
	 * @param string
	 */
	public static void showdialog(Activity activity) {
		progressDialog = new ProgressDialog(activity);
		progressDialog.setMessage(Config.changeLanguage(MyAppliction.mCn)
				.getLoading());

		if (!progressDialog.isShowing()) {
			progressDialog.show();
		}
		progressDialog.setCancelable(false);
		progressDialog.setCanceledOnTouchOutside(false);// 点击dilaog外面不消失
	}

	/**
	 * 取消dialog
	 */
	public static void dimssdialog() {
		if (progressDialog.isShowing())
			progressDialog.dismiss();
	}

	/**
	 * 判断dialog是否显示
	 * 
	 * @return
	 */
	public static boolean ifshowdialog() {
		if (progressDialog.isShowing()) {
			return true;
		}
		return false;

	}
}
